package com.mycompany.delivery.servicelayer;


import com.mycompany.delivery.dto.ContactDTO;
import com.mycompany.delivery.dto.DeliveryDTO;
import com.mycompany.delivery.dto.UserDTO;


import java.util.List;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Jana Nemcova
 */
public interface UserService {
     /**
     * Creates employee 
     * @param userDTO
     */
    public UserDTO createEmployee(UserDTO p);

        /**
     * Creates courier 
     * @param userDTO
     */
    public UserDTO createCourier(UserDTO p);
    
    /**
     * Updates courier 
     * @param userDTO
     */
    public UserDTO updateCourier(UserDTO p);
    
     /**
     * Updates empolyee 
     * @param userDTO
     */
    public UserDTO updateEmployee(UserDTO p);

    /**
     * Removes user by login 
     * @param login
     */
    public void remove(String  login);
    
    /**
     * Remove courier 
     * @param userDTO
     */
    public void removeCourier(UserDTO p);
    
     /**
     * Remove empolyee 
     * @param userDTO
     */
    public void removeEmployee(UserDTO p);
    
    /**
     * Finds user by ID
     * @param userDTO
     */
    public UserDTO findCourier(Long id);

      /**
     * Finds user by ID
     * @param userDTO
     */
    public UserDTO findEmployee(Long id);
     /**
     * finds user by login 
     * @param userDTO
     */
    public UserDTO findUserByLogin(String login);
    
    /**
     * Returns all users that exists in database
     */  
    public List<UserDTO> getAllUsers();
    
    /**
     * Returns all couriers that exists in database
     */  
    public List<UserDTO> getAllCouriers();
    
    /**
     * Returns all employees that exists in database
     */  
    public List<UserDTO> getAllEmployees();
    /**
     * if user contains delivery with given id return true
     * @param user
     * @param deliveryID
     * @return 
     */
     public boolean userContainsDelivery( UserDTO user, Long deliveryID);
}

 
